package com.dongqi.guardrailData.controller;

import com.dongqi.guardrailData.service.GuardrailService;
import com.dongqi.utils.RestResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Slf4j
@RestController
@RequestMapping(value = "/guardrail")
public class GuardrailController {
    @Autowired
    private GuardrailService guardrailService;


    @GetMapping("/query")
    public RestResult query() {
        Map<String, Object> guardrailBoardDTO = guardrailService.queryAll();
        return RestResult.success(guardrailBoardDTO);
    }

}
